from jsonpath_ng import jsonpath, parse

def datalist(dpath,list):
    reslist=[]
    dpath2=[parse(one) for one in dpath]
    for line in list:
        reslinedata=[]
        for dp in dpath2:
            reslinedata.extend([match.value for match in dp.find(line)])
        reslist.append(reslinedata)
    return reslist